package com.md.drcs.dicom.entity;

import com.md.common.exception.BaseErrorCode;
import com.md.common.utils.json.JSONUtil;
import com.md.common.utils.validate.SaveValidator;
import com.md.common.utils.validate.UpdateValidator;
import org.apache.commons.lang3.StringUtils;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 功能描述：t_study_help表实体
 * 
 * @author liuzg1@guahao.com
 * @version 1.0
 * @date 2018/12/11 18:04
 * @since JDK 1.8
 */
@Table(name = "t_study_help")
public class StudyHelpEntity implements Serializable{
	
	//columns START
	/**
	 * id
	 */
	@Id
	private Integer id;
	/**
	 * 检查ID
	 */
	@NotNull(message = "#" + BaseErrorCode.IS_NULL, groups = {SaveValidator.class, UpdateValidator.class})
	private Long studyId;
	/**
	 * 检查号
	 */
	private String studyNum;
	/**
	 * 患者ID
	 */
	private Long patientId;
	/**
	 * 患者姓名
	 */
	private String patientName;
	/**
	 * 性别
	 */
	private String sex;
	/**
	 * 年龄
	 */
	private String age;
	/**
	 * 医院ID
	 */
	private String hospitalId;
	/**
	 * 申请人ID
	 */
	private Integer fromUserId;
	/**
	 * 申请人姓名
	 */
	private String fromUserName;
	/**
	 * 被申请人ID
	 */
	@NotNull(message = "#" + BaseErrorCode.IS_NULL, groups = {SaveValidator.class, UpdateValidator.class})
	private Integer toUserId;
	/**
	 * 被申请人姓名
	 */
	private String toUserName;
	/**
	 * 申请时间
	 */
	private LocalDateTime createTime;
	/**
	 * 协助状态：1-初始化，2-已处理
	 */
	private Integer status;
	/**
	 * 协助处理时间
	 */
	private LocalDateTime handleTime;
	//columns END 数据库字段结束
	
	//get and set
	public void setId(Integer id) {
		this.id = id;
	}
	
	public Integer getId() {
		return this.id;
	}
	
	public void setStudyId(Long studyId) {
		this.studyId = studyId;
	}
	
	public Long getStudyId() {
		return this.studyId;
	}

	public String getStudyNum() {
		return studyNum;
	}

	public void setStudyNum(String studyNum) {
		this.studyNum = studyNum;
	}

	public void setPatientId(Long patientId) {
		this.patientId = patientId;
	}
	
	public Long getPatientId() {
		return this.patientId;
	}
	
	public void setPatientName(String patientName) {
		this.patientName = StringUtils.trim(patientName);
	}
	
	public String getPatientName() {
		return this.patientName;
	}
	
	public void setSex(String sex) {
		this.sex = StringUtils.trim(sex);
	}
	
	public String getSex() {
		return this.sex;
	}
	
	public void setAge(String age) {
		this.age = StringUtils.trim(age);
	}
	
	public String getAge() {
		return this.age;
	}
	
	public void setHospitalId(String hospitalId) {
		this.hospitalId = StringUtils.trim(hospitalId);
	}
	
	public String getHospitalId() {
		return this.hospitalId;
	}
	
	public void setFromUserId(Integer fromUserId) {
		this.fromUserId = fromUserId;
	}
	
	public Integer getFromUserId() {
		return this.fromUserId;
	}
	
	public void setFromUserName(String fromUserName) {
		this.fromUserName = StringUtils.trim(fromUserName);
	}
	
	public String getFromUserName() {
		return this.fromUserName;
	}
	
	public void setToUserId(Integer toUserId) {
		this.toUserId = toUserId;
	}
	
	public Integer getToUserId() {
		return this.toUserId;
	}
	
	public void setToUserName(String toUserName) {
		this.toUserName = StringUtils.trim(toUserName);
	}
	
	public String getToUserName() {
		return this.toUserName;
	}
	
	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}
	
	public LocalDateTime getCreateTime() {
		return this.createTime;
	}
	
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	public Integer getStatus() {
		return this.status;
	}
	
	public void setHandleTime(LocalDateTime handleTime) {
		this.handleTime = handleTime;
	}
	
	public LocalDateTime getHandleTime() {
		return this.handleTime;
	}
	
	
	public String toString() {
		return JSONUtil.toJSON(this);
	}
	
}

	
